package com.example.entity;

import cn.idev.excel.annotation.ExcelIgnore;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.format.DateTimeFormat;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import cn.idev.excel.annotation.write.style.ContentRowHeight;
import cn.idev.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ContentRowHeight(30)
@HeadRowHeight(40)
@ColumnWidth(25)
@ApiModel(value = "用户业务类", description = "表现层对象。通常用于业务层之间的数据传递")
public class UserVO {
    @ExcelProperty(value = {"人员信息","人员编号"},order = 1)
    private Integer id;
    @ExcelProperty(value = {"人员信息","姓名"},order = 2)
    @NotBlank(message = "姓名不能为空")
    private String name;
    @ExcelProperty(value = {"人员信息","年龄"},order = 3)
    @NotNull(message = "年龄不能为空")
    private Integer age;
    @ExcelProperty(value = {"人员信息","阵营"},order = 4)
    private String camp;
    @ExcelProperty(value = {"人员信息","出生年"},order = 5)
    private String birthYear;
    @ExcelIgnore
    @ApiModelProperty(value = "处理前端传入的字符串时间参数")
    @DateTimeFormat(value = "yyyy-MM-dd")
    private Date birthDate;

}